<template>
  <div class="midden-bottom">
    <div class="title">代金券、优惠券余额</div>
    <div class="content">
      <div class="left">
        <div class="off">
          <span>已核销</span>
          <dv-water-level-pond
            style="width: 90px; height: 90px"
            :config="{
              data: [couponData.daijin_money_rate | newNumber],
              shape: 'round',
            }"
          />
        </div>
        <div class="use">
          <div>已使用</div>
          <div class="info">
            <span>代金券余额</span>
            <span>{{ couponData.left_daijin_money }}</span>
          </div>
        </div>
      </div>
      <div class="right">
        <div class="off">
          <span>已核销</span>
          <dv-water-level-pond
            :config="{
              data: [couponData.youhui_money_rate],
              shape: 'round',
            }"
            style="width: 90px; height: 90px"
          />
        </div>
        <div class="use">
          <div>已使用</div>
          <div class="info">
            <span>优惠券余额</span>
            <span>{{ couponData.left_youhui_money }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    couponData: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {};
  },
  filters: {
    newNumber(a) {
      return parseFloat(a).toFixed(2);
    },
  },
};
</script>

<style scoped lang="less">
.midden-bottom {
  //background: #0b2c47;
  border-radius: 10px;
  margin-top: 21px;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0 40px;
  .title {
    font-size: 20px;
    font-family: Adobe Heiti Std;
    margin-top: 13px;
    overflow: hidden;
    margin-top: 20px;
    &::before {
      content: "";
      width: 20px;
      height: 20px;
      background: url("../../assets/par.png") no-repeat;
      background-size: cover;
    }
  }
  .content {
    display: flex;
    justify-content: space-around;
    margin-top: 24px;
    .left,
    .right {
      font-size: 14px;
      font-family: Adobe Heiti Std;
      font-weight: normal;
      display: flex;
      .off {
        display: flex;
      }
      .use {
        overflow: hidden;
        padding-left: 42px;
        .info {
          width: 211px;
          height: 50px;
          background: rgb(15, 70, 123);
          border-left: 4px solid rgb(18, 123, 202);
          font-size: 15px;
          line-height: 50px;
          display: flex;
          justify-content: space-between;
          padding: 0 18px 0 16px;
          margin-top: 33px;
        }
      }
    }
  }
}
</style>
